
begintalkscript;

variables;
int pc_counter, in_inn;

begintalknode 10;
	state = -1;
	nextstate = 10;
	question = "Anthony";
	text1 = "This man is Anthony, and he runs the Golden Egret. You spoke with him last the night you arrived, when you decided to celebrate your arrival with a nice bottle of ale. He's a nice man, but stingy about his customers' tabs.";
	text2 = "Regrettably, the ale made it hard for you to remember most of your conversation. All you can remember is that he's an apprentice of some kind, and that you owe him 15 gold for the ale.";
	text3 = "You find him at the bar, wiping the counter with a rag. He smiles at you and says, _Hey, look who owes me 15 gold!_";
	text5 = "You try to start a conversation with Anthony, but he ignores you. He's probably mad about the bar tab.";
	text6 = "Anthony's still here, watching over his customers.";
	text8 = "You try to start a conversation with Anthony, but he can't seem to hear you. Perhaps you should go inside to speak with him.";
	action = INTRO;
	code = 
		if(get_flag(0,1) == 0) {
			remove_string(6);
			remove_string(8);
		}
		else {
		remove_string(5);
		remove_string(8);
	}
	
	in_inn = 0;
	pc_counter = 0;
	while((in_inn == 0) && (pc_counter < 4)) {
		if((char_loc_x(pc_counter) >= 11) && (char_loc_x(pc_counter) <= 19) && (char_loc_y(pc_counter) <= 22) && (char_loc_y(pc_counter) >= 7)) {
			in_inn = 1;
		}
		pc_counter = pc_counter + 1;
	}
	if(in_inn == 0) {
		clear_strings();
		add_string(8);
		end();
	}
	break;
begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 0;
	question = "I'd like to settle my tab. (Give him 15 gold)";
	text1 = "Once Anthony realizes that you don't have money, he simply refuses to speak to you.";
	text2 = "You hand the money to Anthony, and he carefully counts each piece. When he finishes, he waves his hand, and the money disappears. Then he smiles at you.";
	text3 = "_Well, now that we've settled that, how can I help you?_";
	text4 = "Ah, that was it. He was an apprentice mage.";
	code = 
		if(coins_amount() < 15) {
			clear_strings();
			add_string(1);
			end();
		}
		else {
		remove_string(1);
		change_coins(-15);
		set_flag(0,1,1);
		toggle_quest(0,0);
	}
	break;
begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 0;
	question = "I don't feel like settling my tab yet.";
	text1 = "_Well, that's fine with me,_ Anthony says. He doesn't say anything else.";
	action = END_TALK;

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = (get_flag(0,1) == 1) && (get_flag(0,2) == 0);
	question = "What services do you offer again?";
	text1 = "Anthony smiles. _That ale certainly did a number on your memory, now didn't it? Ah, well... I'll refresh it for you._";
	text2 = "_We got ale, we got wine, we got rooms, and we got food. The ale and wine are cold, the rooms are warm and comfortable, and the food is delicious. Ale's ten coins, wine's twenty, room's thirty. That's about it._";
	code = 
		set_flag(0,2,1);
	break;
begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,2) == 1;
	question = "A round of ale, please! (10 coins)";
	text1 = "Once Anthony realizes that you're not about to hand him money, he just frowns and says, _As soon as you can cough up ten coins._";
	text2 = "You hand Anthony the money, and he waves a hand while muttering a few arcane syllables. The money disappears, and the cabinet at the end of the bar opens. A bottle of ale floats out and comes to rest on the counter.";
	text3 = "The bottle is similar to the one you drank when you arrived in town. After a few drinks, you find that it's not as high-quality as the first one, but you do get just as drunk as before.";
	text4 = "_Anything else?_ Anthony asks, happy to see drunken customers.";
	text5 = "Anthony takes a good look at you. _You're already drunk... I'm cutting you off until you sober up._";
	text6 = "Your attempts to convince him of your sobriety are best described as either hilarious or pathetic. Either way, the display doesn't change his mind.";
	code = 
		if(coins_amount() < 10) {
			clear_strings();
			add_string(1);
		}
		else if(party_has_status(28)) {
		clear_strings();
		add_string(5);
		add_string(6);
	}
	else {
	change_coins(-10);
	remove_string(1);
	remove_string(5);
	remove_string(6);
	set_party_status(28,20,1);
}
	break;
begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,2) == 1;
	question = "A round of wine! (20 coins)";
	text1 = "Once Anthony realizes that you're not about to hand him money, he just frowns and says, _As soon as you can cough up twenty coins._";
	text2 = "You hand Anthony the money, and he waves a hand while muttering a few arcane syllables. The money disappears, and the cabinet at the end of the bar opens. A bottle of wine floats out and comes to rest on the counter.";
	text3 = "The wine is faintly bitter, just enough to keep you from completely enjoying it. You do still get drunk, though.";
	text4 = "_Anything else?_ Anthony asks, happy to see drunken customers.";
	text5 = "Anthony takes a good look at you. _You're already drunk... I'm cutting you off until you sober up._";
	text6 = "Your attempts to convince him of your sobriety are best described as either hilarious or pathetic. Either way, the display doesn't change his mind.";
	code = 
		if(coins_amount() < 20) {
			clear_strings();
			add_string(1);
		}
		else if(party_has_status(28)) {
		clear_strings();
		add_string(5);
		add_string(6);
	}
	else {
	change_coins(-20);
	remove_string(1);
	remove_string(5);
	remove_string(6);
	set_party_status(28,40,1);
}
	break;
begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,2) == 1;
	question = "A room for the night, please. (30 coins)";
	text1 = "Once Anthony realizes that you're not about to hand him money, he just frowns and says, _As soon as you can cough up thirty coins._";
	text2 = "You hand Anthony the money, and he waves a hand while muttering a few arcane syllables. The money disappears, and Anthony smiles.";
	text3 = "_Okay, you can sleep in any of the rooms upstairs. I'd show you to them, but you know where they are. So, enjoy._";
	code = 
		if(coins_amount() < 30) {
			clear_strings();
			add_string(1);
		}
		else {
		remove_string(1);
		set_flag(2,4,1);
		change_coins(-30);
	}
	break;
begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,2) == 1;
	question = "How about some food?";
	text1 = "You finish shopping.";
	text2 = "_Anything else?_ Anthony asks.";
	code = 
		begin_shop_mode("The Golden Egret","Anthony has some food, which he's willing to offer you for a fair price.",5,2,-1);
	break;
begintalknode 18;
	state = 10;
	nextstate = 11;
	condition = get_flag(0,1) == 1;
	question = "So you're a mage, right?";
	text1 = "_Why yes I am,_ Anthony says. He waves a hand dramatically, and a ball of fire appears in his palm. A few people turn and applaud.";
	text2 = "Anthony waves his other hand and the flames disappear. _I love doing that._";
	text3 = "_But technically, I'm still an apprentice. You see, I was studying at the Chorin Academy down south, and one of the wings exploded one day. Nothing left. So, the school closed for a while, and I realized I was running out of money._";
	text4 = "_So, I started up this inn with the money I had left, and I've been saving up to finish my studies. But everything's been going so well that I might just be content to stay here._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	question = "But aren't there laws against practicing magic without finishing your studies?";
	text1 = "Anthony laughs, and pulls a huge pile of papers out from behind the counter. _Trust me, you're not the first to try and turn me in for unlicensed magery. These are all the papers I need to conduct my business the way I want._";
	text2 = "_So to answer your question, yes there are. But thank the gods that there are loopholes._";

begintalknode 20;
	state = 11;
	nextstate = -1;
	question = "So can you teach magic?";
	text1 = "_No, I'm afraid I'm not licensed to do that. Even if I were, I doubt that any of my little tricks would be useful for adventurers like you._";

begintalknode 21;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 1;
	question = "So, why the Golden Egret?";
	text1 = "Anthony pauses to think, and you begin to fear that he's going to tell some long, boring story that has absolutely nothing to do with anything.";
	text2 = "_Well, I found the sign at a junk sale, and I decided that was good enough for me. I'm not sure if it came from another inn with the same name, but if it did, I've never been to that inn._";
	text3 = "Whew. That was a close call.";

begintalknode 22;
	state = 10;
	nextstate = 12;
	condition = get_flag(0,1) == 1;
	question = "So, what can you tell me about Relonar?";
	text1 = "_Eh, it's quiet around here. Not much has been going on lately._";
	text2 = "_I mean, we don't really have a big city around for miles. There's some farms back off to the west, but you probably knew that._";
	text3 = "_Then, there's the Cathedral of winds. Huge church, up north. Never been up there myself, but I hear it's downright beautiful._";
	text4 = "_And of course, there's Stratton. That's about it._";

begintalknode 23;
	state = 12;
	nextstate = -1;
	question = "What's the fastest way to get to the cathedral?";
	text1 = "_Eh, just follow the road out of town. You can't miss it._";
	code = 
		if(get_flag(30,0) == 0)
			set_flag(30,0,1);
	break;
begintalknode 24;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,15) == 1;
	question = "Do you know a woman named Rebecca?";
	text1 = "You describe Rebecca to Anthony, and tell him that she admires him. Anthony stares at the ceiling and rubs his chin for a while.";
	text2 = "_Nope, the name doesn't ring a bell. Sorry._";
	code = 
		set_flag(0,15,2);
	break;
begintalknode 30;
	state = -1;
	nextstate = 30;
	question = "Ryan";
	text1 = "This man appears to be an Empire soldier, or so you'd guess from the Empire insignia on his armor. He doesn't look too happy, and is busy staring at the bottom of a glass of something dark.";
	text2 = "He acknowledges your presence with a grunt. After a long pause, he speaks. _The name's Ryan. What do yeh want?_";
	text3 = "His thick accent makes you wonder exactly what corner of the Empire he hails from.";
	text5 = "Ryan's still here, and he still looks very depressed.";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	question = "What's wrong?";
	text1 = "Ryan looks away from his drink to stare at you. Not just a regular stare, either... this stare could probably kill a kobold at five paces.";
	text2 = "_Nothing yeh can do anythin' about. Now leave me to mah drink._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Are you sure? I'm an adventurer, after all.";
	text1 = "He sizes you up for a moment. Then he laughs, a low and throaty laugh that's just a bit unsettling.";
	text2 = "_Ah'm certain. Now leave me alone._";
	action = END_TALK;

begintalknode 33;
	state = 31;
	nextstate = -1;
	condition = party_size() > 1;
	question = "Are you sure? We're adventurers, after all.";
	text1 = "He sizes you up for a moment. Then he laughs, a low and throaty laugh that's just a bit unsettling.";
	text2 = "_Ah'm certain. Now leave me alone._";
	action = END_TALK;

begintalknode 34;
	state = 30;
	nextstate = -1;
	question = "Are you on duty?";
	text1 = "He stares at the bottom of his glass with renewed vigor.";
	text2 = "_No, ah've been off duty fer nigh three months. Told me captain he could shove it where the sun don't shine, after he told mah battallion to charge a pack o' efreet that were mindin' their own damn business._";
	text3 = "_Ah asked 'im why we'd be gettin' ourselves killed, an' he said 'Fer the glory of the Empire'. That's when ah decided it was time to get out._";
	text4 = " He looks at you incredulously. _No. Ah told yeh before, ah've been off duty fer nigh three months._";
	code = 
		if(get_flag(0,3) == 0) {
			remove_string(4);
			set_flag(0,3,1);
		}
		else{
		clear_strings();
		add_string(4);
	}
	break;
begintalknode 40;
	state = -1;
	nextstate = 40;
	question = "Alexa";
	text1 = "This woman is dressed like any normal townswoman, and the only thing that sets her apart from one is the large chunk of amber in her hands. This makes her worth talking to, from an adventurer's point of view.";
	text2 = "While you think about how to address her, she speaks. _You can stop staring at my amber now. The name's Alexa, and I'm a mage. What do you want?_";
	text3 = "For lack of a better word, you're embarrassed.";
	text5 = "Alexa calmly sips a mug of something, examining the piece of amber.";
	text6 = "_Well?_ she says.";
	action = INTRO;

begintalknode 41;
	state = 40;
	nextstate = -1;
	condition = get_flag(0,4) == 0;
	question = "What services do you offer?";
	text1 = "_Well, I can teach spells for a modest fee, some of which might be useful to you in your travels. Also, I can probably identify any strange and or magical items you have._";
	text2 = "_Nothing else that would interest an adventurer like you,_ she adds with a hint of sarcasm.";
	text3 = "_Nothing else that would interest adventurers like yourselves,_ she adds with a hint of sarcasm.";
	code = 
		set_flag(0,4,1);
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(2);
	break;
begintalknode 42;
	state = 40;
	nextstate = -1;
	condition = get_flag(0,5) == 0;
	question = "What brings you to Stratton?";
	text1 = "Alexa looks at you with a dry smile. _I live here. I just enjoy people-watching._";
	code = 
		set_flag(0,5,1);
	break;
begintalknode 43;
	state = 40;
	nextstate = -1;
	question = "Do you know anything interesting about Relonar?";
	text1 = "_Actually, I think I know quite a bit of interesting trivia about Relonar. I know where the best alchemical ingredients grow, I know where the finest deposits of amber tend to crop up, and I know more about the Chorin Academy than anyone._";
	text2 = "_As for things that I'm willing to tell you, I believe I'm fresh out for today._";

begintalknode 44;
	state = 40;
	nextstate = 41;
	condition = get_flag(0,6) == 0;
	question = "What's with the amber?";
	text1 = "Alexa perks up a bit, clearly excited to see someone genuinely interested in her work. Granted, you're not all that interested, but you're not about to tell her that.";
	text2 = "_Well, you see, I've been spending a lot of time researching the formation of amber, and looking at pieces with preserved specimens of insects and animals inside them._";
	text3 = "_I've been wondering how feasible it would be to take a piece of one of these specimens and use it to magically construct a new, living facsimile of the dead one. In theory, the possibilities are endless!_";
	text4 = "_In practice, though... well, it's been difficult. I was trying to reconstruct an ancient beetle that had been very nicely preserved, and the facsimile kept coming out looking like some sort of wingless, deformed drake._";
	text5 = "She sighs. _You can't win them all, right?_";
	code = 
		set_flag(0,6,1);
	break;
begintalknode 45;
	state = 40;
	nextstate = -1;
	condition = (get_flag(0,4) == 1) && (party_size() != 1);
	question = "Could you identify some items for us?";
	text1 = "_Why certainly,_ Alexa says with a smile. _Five coins apiece._";
	action = ID 0;

begintalknode 46;
	state = 40;
	nextstate = -1;
	condition = (get_flag(0,4) == 1) && (party_size() == 1);
	question = "Could you identify some items for me?";
	text1 = "_Why certainly,_ Alexa says with a smile. _Five coins apiece._";
	action = ID 0;

begintalknode 47;
	state = 40;
	nextstate = -1;
	condition = get_flag(0,4) == 1;
	question = "What spells can you teach?";
	text1 = "Alexa finishes describing the spells she's able to teach.";
	text2 = "_Right, anything else?_";
	code = 
		begin_shop_mode("Alexa's Spells","Alexa has a few spells that she's willing to teach you, for a modest fee. She doesn't try particularly hard to sell you on any of them, but she doesn't need to. These spells actually look useful.",6,3,-1);
	break;
begintalknode 48;
	state = 41;
	nextstate = -1;
	question = "What would you do if you succeeded?";
	text1 = "Alexa pauses, and sets the amber down on the table. It looks as if she never actually thought about this particular possibility.";
	text2 = "_Well... I suppose I'll move on to bigger things. Or maybe just sell the secret to some lunatic landowner with more gold than sense, and then retire. One of the two._";

begintalknode 50;
	state = -1;
	nextstate = -1;
	question = "Captain";
	text1 = "This man appears to be a run-of-the-mill Empire captain, judging from the recently-polished armor, the prominent Empire insignias, and the sneer that could drive a hundred recruits away.";
	text2 = "Thus, you're not terribly surprised when he completely ignores you, instead choosing to focus on the story being told by the soldier sitting across from him.";

begintalknode 51;
	state = -1;
	nextstate = -1;
	question = "Soldier";
	text1 = "This man seems to be a run-of-the-mill Empire grunt, complete with a slightly vacant expression. You attempt to gain his attention, but he seems focused on the story being told by the soldier sitting across from him.";

begintalknode 55;
	state = -1;
	nextstate = 55;
	question = "Soldier";
	text1 = "This soldier seems slightly more alert than the average Empire grunt, and he doesn't sound like he's from around here. He's in the middle of telling a story when you approach him.";
	text2 = "_...you see, we were vastly outnumbered. Lizards as far as the eye could see, breathin' fire an' ice, and with teeth as long as yer arm. O' course, we held the line, skewering as many of 'em as we could. We were just hopin' that bunch of adventurers..._";
	text3 = "He then notices your presence. _Do you mind? I'm tryin' to tell a story 'ere._";
	text4 = "_Anyway, like I was sayin'... we were holdin' the line, and then ol' Trechord just up an' stops yellin' at us. I look over, an' he's been turned to stone! Now, there was no way I could tell which one o' them was a basilisk, but..._";
	text5 = "He continues in this vein for some time. Still, the story is quite interesting.";
	text6 = "This soldier is still telling his stories. They're still fairly interesting, but you get the impression that he's talking about the same battle as last time, just with different details thrown in. You leave him alone, either way.";
	code = 
		if(get_flag(0,7) == 1) {
			clear_strings();
			add_string(6);
		}
		else
		remove_string(6);
		set_flag(0,7,1);
	break;
begintalknode 60;
	state = -1;
	nextstate = -1;
	question = "Traveler";
	text1 = "This woman is busy talking with her fellow travelers, sharing that special kind of bond that's only shared by people who get drunk together. They're all laughing hysterically at something.";
	text2 = "You try to listen in, but it seems that it was one of those jokes where you just had to be there. Either that, or they're just laughing because everyone else is. Either way, this woman doesn't want to talk to you.";

begintalknode 61;
	state = -1;
	nextstate = -1;
	question = "Traveler";
	text1 = "This man is laughing frantically, occasionally gasping for breath. He also appears to be very drunk.";
	text2 = "When he catches his breath, he takes a swig of his drink. Then, one of his companions says something barely coherent, and he dissolves into uncontrollable laughter again. Needless to say, he's not going to talk to you.";

begintalknode 62;
	state = -1;
	nextstate = -1;
	question = "Traveler";
	text1 = "This man is busy drinking. When he comes up from his drink for air, he pauses long enough to deliver a lame pun, the kind that's only funny after a few stiff drinks. Then, he promptly goes back to his glass.";
	text2 = "He doesn't even notice your presence.";

begintalknode 63;
	state = -1;
	nextstate = -1;
	question = "Traveler";
	text1 = "This woman looks a great deal richer than her companions, but she looks equally as drunk. Every so often, she shouts out for another round of ale, to the delight of all.";
	text2 = "She doesn't notice you, and you doubt that she'd want to talk anyway.";

begintalknode 70;
	state = -1;
	nextstate = 70;
	question = "Mayor Rusk";
	text1 = "This old man looks out of place in this claustrophobic room. His face and arms are covered with jagged scars, and he looks like he could hold his own in any fight.";
	text2 = "He looks up from the classic bureaucrat's paperwork-covered desk and sighs. _Greetings, adventurers. I am Mayor Rusk. What brings you to this little town?_";
	text3 = "He looks up from the classic bureaucrat's paperwork-covered desk and sighs. _Greetings, adventurer. I am Mayor Rusk. What brings you to this little town?_";
	text5 = "Mayor Rusk scribbles something on a piece of paper and then shoves it into a drawer on his desk. Yet somehow, the piles of paper don't look any smaller.";
	text6 = "_Yes?_";
	action = INTRO;
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
		remove_string(3);
	break;
begintalknode 71;
	state = 70;
	nextstate = 71;
	question = "What gave you those scars?";
	text1 = "The mayor sighs. _If you must know, it was a pack of ursagi that snuck up on me. Those bastards move faster than you think. It was the fight that made me hang up my sword._";
	text2 = "_One second, they're a pink speck on the horizon. The next, their friends sneak up behind you and claw you in the face. They just don't fight fair._";
	text3 = "_Look, I told you before. Ursagi. Claws. Face. Gods, you're dense._";
	code = 
		if(get_flag(0,8) == 1) {
			remove_string(1);
			remove_string(2);
		}
		else
		remove_string(3);
		set_flag(0,8,1);
	break;
begintalknode 72;
	state = 70;
	nextstate = 72;
	question = "What's it like running this town?";
	text1 = "_Well, it's dull. I suppose I can be thankful for that. Some mayors have to coordinate a bunch of lunatic rescue attempts, keep tabs on ten groups of mercenaries, and figure out how to write ransom money into expense reports._";
	text2 = "He sighs. _I just write the occasional letter to the imperial governor, keep tabs on what passes for our economy, and settle the occasional barfight when Anthony can't deal with it._";
	text3 = "_Let me give you some advice. Don't retire. It's better to go out in a puff of smoke fighting a haaki than it is to rot in a backwater nowhere with endless supplies of paper._";

begintalknode 73;
	state = 70;
	nextstate = -1;
	question = "Are there any quests you need done?";
	text1 = "_Nope. This town is dull. Barton gets most of the action in this province. Anything that happens here is small enough that I can deal with it myself._";
	text2 = "_All I can ask of you is not to cause trouble... I know how easy it is to raise hell in a town like this. Just resist the temptation,_ he adds with a smile.";

begintalknode 74;
	state = 71;
	nextstate = -1;
	question = "How'd you get into a fight with ursagi?";
	text1 = "_What do you think? I used to be an adventurer,_ he says, clearly annoyed.";
	text2 = "_I spent twenty years doing menial jobs for Empire lapdogs, and this is my reward. They said 'position of power', and they give me the reins of this no-horse town._";
	text3 = "_Gods, makes me wish that the rest of my party had lived. Maybe I would've stood a chance at staying in the adventuring business._";
	text5 = "_Ye gods, you're stupid. I told you, I was an adventurer._";
	text6 = "He stops and thinks for a moment. _Are all adventurers this dense nowadays?_";
	code = 
		if(get_flag(0,9) == 1) {
			remove_string(1);
			remove_string(2);
			remove_string(3);
		}
		else {
		remove_string(5);
		remove_string(6);
		set_flag(0,9,1);
	}
	break;
begintalknode 75;
	state = 72;
	nextstate = -1;
	question = "Why don't you just leave?";
	text1 = "_Look at me,_ he says. Looking at him, you're pretty certain he could bench-press a golem.";
	text2 = "_I'm too old to go back to that. I would if I could, but I can't so I won't. And don't think about asking me to travel with you... I know how it goes. I used to ask the old folks that same question._";
	text3 = "_As much as I hate to say it, this is my retirement._";

begintalknode 80;
	state = -1;
	nextstate = 80;
	question = "Helen";
	text1 = "This woman is currently busy rearranging piles of herbs, occasionally turning to check on something in a mortar on the counter. It takes a while for her to notice you.";
	text2 = "_Hello, friends. The name's Helen, and I'm kind of new here. What can I do for you?_";
	text3 = "_Hello, friend. The name's Helen, and I'm kind of new here. What can I do for you?_";
	text4 = "It's always refreshing to see somebody in your travels who just seems perfectly normal, and Helen appears to be one of those people.";
	text5 = "Helen's still rearranging things.";
	text6 = "_Yes?_";
	action = INTRO;
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
		remove_string(3);
	break;
begintalknode 81;
	state = 80;
	nextstate = 81;
	question = "Where are you originally from?";
	text1 = "Helen sighs. _Yris... beautiful place. About as far away from here as possible._";
	text2 = "She seems unwilling to elaborate.";
	text3 = "_Look, I told you before. I really don't want to talk about it._";
	text4 = "She sounds like she's about to either cry or scream, neither of which sounds very good right now.";
	code = 
		if(get_flag(0,11) == 1) {
			remove_string(1);
			remove_string(2);
			end();
		}
		else {
		remove_string(3);
		remove_string(4);
	}
	break;
begintalknode 82;
	state = 80;
	nextstate = -1;
	condition = get_flag(0,10) == 0;
	question = "What do you do here?";
	text1 = "_Well, right now, I'm unpacking. Setting up shop, really. I sell herbs and potions._";
	text2 = "She sighs, and stirs the substance in the mortar on the counter. _I focus on home-brew remedies, the kind of thing that the average person around here can benefit from. Not everybody in this town has to cater to adventurers and rich travelers, you know._";
	text3 = "_But before you ask, some of my stuff is 'adventurer strength'. I'm sure you'd be able to make use of it. And if you really want to shell out some gold, I can teach you how to make some of them._";
	code = 
		set_flag(0,10,1);
	break;
begintalknode 83;
	state = 80;
	nextstate = -1;
	condition = get_flag(0,10) == 1;
	question = "What do you have for sale?";
	text1 = "You finish browsing the piles on the counter.";
	text2 = "_Anything else?_";
	code = 
		begin_shop_mode("Helen's Potions","Helen gestures to the pile of herbs and potions in front of her. 'Anything here is for sale. Happy hunting.'",4,3,-1);
	break;
begintalknode 84;
	state = 80;
	nextstate = -1;
	condition = get_flag(0,10) == 1;
	question = "What recipes do you know?";
	text1 = "Helen finishes describing the potion recipes she can teach.";
	text2 = "_Anything else?_";
	code = 
		begin_shop_mode("Helen's Recipes","'Now you've got to understand, these recipes are what keep me in business,' Helen says in an attempt to ease your shock over the prices.",7,5,-1);
	break;
begintalknode 85;
	state = 80;
	nextstate = -1;
	question = "What do you think about this area?";
	text1 = "_Well, I haven't been here long enough to really know. But, from what I've seen, it's nice. It's quiet and calm, which is all I really need right now._";
	text2 = "_I'm sure that once I get settled in, I'll be able to tell you any number of stories. But now, no._";

begintalknode 86;
	state = 80;
	nextstate = -1;
	question = "Any quests you need done?";
	text1 = "Helen doesn't even pause to think. _No, not really. I'm still scouting out places to gather herbs, and I'd prefer to do that myself._";
	text2 = "_So, unless you have any suggestions about how to decorate this place, I don't need your help right now. Thanks for offering, though... reminds me of some kind folks back in Yris._";

begintalknode 87;
	state = 81;
	nextstate = -1;
	question = "Why'd you leave?";
	text1 = "She shudders. _There was... a lot of violence. A town was destroyed. And then it got worse. I don't really want to talk about it._";
	text2 = "Again, she seems unwilling to elaborate.";
	code = 
		set_flag(0,11,1);
	break;
begintalknode 90;
	state = -1;
	nextstate = 90;
	question = "Johann";
	text1 = "This rather bulky man is busy working on the firing mechanism of a crossbow. Considering how large he is, you're surprised that he has the dexterity needed to do that kind of work.";
	text2 = "When he notices you, he sets the crossbow on the table in front of him and extends a huge hand. _Greetings, friends. I am Johann, the finest hunter in all of Relonar._";
	text3 = "When he notices you, he sets the crossbow on the table in front of him and extends a huge hand. _Greetings, friend. I am Johann, the finest hunter in all of Relonar._";
	text5 = "Johann continues tinkering with a crossbow.";
	text6 = "_Well, what?_";
	action = INTRO;
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
		remove_string(3);
	break;
begintalknode 91;
	state = 90;
	nextstate = -1;
	question = "How do you know you're the finest hunter in Relonar?";
	text1 = "_Well, I killed the last one who claimed it,_ he says, his expression not changing at all. After an awkward silence, he laughs.";
	text2 = "_No, I'm kidding. There was a contest held south of Barton last fall, and I won. They marked a wolf, set it free in the woods, and let us go after it._";
	text3 = "_I was the first to track it down and kill it._";
	text4 = "_I told you before, I won a contest last fall._";
	code = 
		if(get_flag(0,12) == 1) {
			clear_strings();
			add_string(4);
		}
		else
		remove_string(4);
		set_flag(0,12,1);
	break;
begintalknode 92;
	state = 90;
	nextstate = -1;
	condition = get_flag(0,13) == 0;
	question = "What do you sell?";
	text1 = "_I'm a fletcher when I'm not out hunting. I can make and repair bows and crossbows, and I'm fairly decent at crafting arrows._";
	text2 = "_Of course, these are fine pieces of work,_ he adds with more than a hint of pride. _I won't be parting with them cheaply. But I can assure you that these are the finest bows at this end of Relonar._";
	code = 
		set_flag(0,13,1);
	break;
begintalknode 93;
	state = 90;
	nextstate = -1;
	condition = (get_flag(0,13) == 1) && (party_size() == 1);
	question = "Let me see what you have for sale.";
	text1 = "You finish shopping.";
	text2 = "_Anything else?_";
	code = 
		begin_shop_mode("Johann's Missiles","Johann once again reassures you that his work is of the finest caliber, and lays out his wares on the counter.",3,3,-1);
	break;
begintalknode 94;
	state = 90;
	nextstate = -1;
	condition = (get_flag(0,13) == 1) && (party_size() != 1);
	question = "Let's see what you have for sale.";
	text1 = "You finish shopping.";
	text2 = "_Anything else?_";
	code = 
		begin_shop_mode("Johann's Missiles","Johann once again reassures you that his work is of the finest caliber, and lays out his wares on the counter.",3,3,-1);
	break;
begintalknode 95;
	state = 90;
	nextstate = -1;
	question = "What's life in Stratton like?";
	text1 = "He laughs heartily. _Oh, I don't live here. I'm just here for a few weeks, trying to unload my equipment._";
	text2 = "_But my initial impression is that it's really quiet. I don't like it. The forests are too quiet at night... no signs of any bears or wolves. I'll be moving on soon._";

begintalknode 100;
	state = -1;
	nextstate = 100;
	question = "Rebecca";
	text1 = "At first glance, this woman looks fairly harmless. Her face practically radiates friendliness, and her clothes fit your mental image of a peaceful merchant.";
	text2 = "However, you soon notice a few burns on her skin, and a few places where her clothes are singed. And unless you're mistaken, you can see her biceps bulging from here.";
	text3 = "Either way, the woman notices you staring at her, and she waves to gain your attention. _Hello? Anybody in there? You can stop staring now._";
	text4 = "You quickly apologize, and the woman introduces herself as Rebecca.";
	text5 = "Rebecca patiently waits for you to say something.";
	action = INTRO;

begintalknode 101;
	state = 100;
	nextstate = -1;
	condition = get_flag(0,14) == 0;
	question = "What do you do here?";
	text1 = "_Well first off, I'm not from here. I live in Barton, and I normally work there. You see, I work in one of the forges there, and I make weapons and armor._";
	text2 = "_I'm here because every so often, I take a vacation from the forge and sell off my creations. It beats the never-ending toil that a lot of my colleagues put themselves through._";
	text3 = "Well, that explains the burns and singed clothes.";
	code = 
		set_flag(0,14,1);
	break;
begintalknode 102;
	state = 100;
	nextstate = -1;
	condition = get_flag(0,14) == 0;
	question = "How'd you get those burns?";
	text1 = "She looks puzzled for a moment, then looks at her arms.";
	text2 = "_Oh, right. Those. I hardly notice them anymore. You see, I work in a forge in Barton, and every so often, I get burned. Don't worry, they're not serious._";

begintalknode 103;
	state = 100;
	nextstate = -1;
	condition = get_flag(0,14) == 1;
	question = "What do you have for sale?";
	text1 = "You finish shopping.";
	text2 = "_Anything else?_ Rebecca asks.";
	code = 
		if(get_flag(0,15) < 4)
			begin_shop_mode("Rebecca's Metalwork","Rebecca lays a decent selection of weapons and armor out on the counter. 'I'm certain some of this is good enough for adventurers.'",0,3,-1);
		else if(get_flag(0,15) == 4)
		begin_shop_mode("Rebecca's Metalwork","Rebecca lays a decent selection of weapons and armor out on the counter. 'I'm certain some of this is good enough for adventurers.'",0,2,-1);
		else
		begin_shop_mode("Rebecca's Metalwork","Rebecca lays a decent selection of weapons and armor out on the counter. 'I'm certain some of this is good enough for adventurers.'",0,4,-1);
	break;
begintalknode 104;
	state = 100;
	nextstate = -1;
	question = "What do you think of Stratton?";
	text1 = "She sighs. _Well, it's peaceful. That makes it the perfect vacation spot for me. And then there's that innkeeper..._";
	text2 = "She trails off, staring off into space for a while. Eventually, she remembers that you're still here, and she snaps back to attention.";
	text3 = "_I'm sorry... what were we talking about again?_";
	code = 
		if(get_flag(0,15) == 0)
			set_flag(0,15,1);
	break;
begintalknode 105;
	state = 100;
	nextstate = 101;
	condition = (get_flag(0,15) == 2) && (party_size() != 1);
	question = "We told Anthony about you.";
	text1 = "For a moment, Rebecca looks like she's about to strike you. Then, her expression softens.";
	text2 = "_What did he say about me?_";
	action = END_TALK;
	code = 
		set_flag(0,15,3);
	break;
begintalknode 106;
	state = 100;
	nextstate = 101;
	condition = (party_size() == 1) && (get_flag(0,15) == 2);
	question = "I told Anthony about you.";
	text1 = "For a moment, it looks as if Rebecca is about to strike you. Then, her expression softens.";
	text2 = "_What did he say about me?_";
	code = 
		set_flag(0,15,3);
	break;
begintalknode 107;
	state = 101;
	nextstate = -1;
	condition = get_flag(0,15) == 3;
	question = "He said he'd love to talk to you.";
	text1 = "You lie through your teeth, making it sound as if Anthony has watched her from afar for ages. As you fabricate your lies, Rebecca daydreams.";
	text2 = "_Well then, I'll have to go over and talk to him later. Thanks!_";
	code = 
		set_flag(0,15,4);
	break;
begintalknode 108;
	state = 101;
	nextstate = -1;
	condition = get_flag(0,15) == 3;
	question = "He said he doesn't know who you are.";
	text1 = "Rebecca visibly sags, clearly heartbroken by this news.";
	text2 = "_Well... that's nice. Thank you for ruining my fantasies._";
	text3 = "Understandably, she seems unwilling to continue the conversation.";
	action = END_TALK;
	code = 
		set_flag(0,15,5);
	break;
begintalknode 109;
	state = 100;
	nextstate = -1;
	condition = get_flag(0,15) == 4;
	question = "So, have you talked to Anthony at all?";
	text1 = "She scowls at you. _That's none of your business, thank you._";

begintalknode 110;
	state = -1;
	nextstate = 110;
	question = "Nathan";
	text1 = "This man is comically short, and his head barely comes above the counter. This doesn't seem to bother him, though. He seems more concerned with the emerald on the counter in front of him, which he examines through a thick magnifying lens.";
	text2 = "Eventually, he notices you. He carefully lays the lens down on the counter.";
	text3 = "_Greetings, adventurers. My name is Nathan. How can I help you?_";
	text4 = "_Greetings, adventurer. My name is Nathan. How can I help you?_";
	text5 = "Nathan's eyes continually scan the assortment of oddities on his counter, as if searching for any possible flaws.";
	text6 = "_Well?_";
	action = INTRO;
	code = 
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(4);
	break;
begintalknode 111;
	state = 110;
	nextstate = -1;
	condition = get_flag(0,16) != 1;
	question = "What do you do here?";
	text1 = "Normally, you have at least some idea what a merchant sells by looking at their counter. However, with Nathan, you're at a loss for words.";
	text2 = "_I'm a jeweler by profession,_ he says as he picks up a dusty scroll tube from the counter. _But I'm a bit of a packrat at heart. So, I sell a bit of everything._";
	text3 = "_And of course,_ he adds with an almost pleading look, _I'm always looking for anything interesting that adventurers like yourselves are willing to sell._";
	text4 = "_And of course,_ he adds with an almost pleading look, _I'm always looking for anything interesting that adventurers like you are willing to sell._";
	code = 
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(4);
		set_flag(0,16,1);
	break;
begintalknode 112;
	state = 110;
	nextstate = -1;
	condition = get_flag(0,16) == 1;
	question = "Let's trade.";
	text1 = "You finish trading.";
	text2 = "_Anything else?_ Nathan asks.";
	code = 
		begin_shop_mode("Nathan's... Stuff","Nathan has a wide variety of... well, not all of it is junk, but most of it is. He is willing to buy your extra items, though.",2,3,3);
	break;
begintalknode 113;
	state = 110;
	nextstate = 111;
	question = "Do you know anything interesting about Stratton?";
	text1 = "Nathan turns his attention to a spool of shiny thread. _Well, it's nice and quiet, but I'm sure you hear that a lot. The Empire does a great job of keeping the dangerous types in check around here._";
	text2 = "_The only interesting thing I've heard is that there's supposed to be a huge cache of jewels hidden somewhere in the cathedral up north._";
	code = 
		set_flag(0,17,1);
	break;
begintalknode 114;
	state = 111;
	nextstate = -1;
	condition = (party_size() == 1) && (get_flag(0,17) < 2);
	question = "Huge cache of jewels? Tell me more.";
	text1 = "Nathan leans in closer to you, though his height makes that rather difficult and just a bit funny.";
	text2 = "_I don't know. I just heard that it's in there somewhere. Of course, I'd pay a hefty sum to anyone who could locate it for me. That sort of thing is what we in the industry call an 'instant retirement fund', so it's incredibly valuable._";
	text3 = "_But let's keep this between you and me, okay?_";
	code = 
		set_flag(0,17,2);
		toggle_quest(2,1);
	break;
begintalknode 115;
	state = 111;
	nextstate = -1;
	condition = (party_size() != 1) && (get_flag(0,17) < 2);
	question = "Huge cache of jewels? Tell us more.";
	text1 = "Nathan leans in closer to you, though his height makes that rather difficult and just a bit funny.";
	text2 = "_I don't know. I just heard that it's in there somewhere. Of course, I'd pay a hefty sum to anyone who could locate it for me. That sort of thing is what we in the industry call an 'instant retirement fund', so it's incredibly valuable._";
	text3 = "_But let's keep this between you and me, okay?_";
	code = 
		set_flag(0,17,2);
		toggle_quest(2,1);
	break;
begintalknode 116;
	state = 110;
	nextstate = -1;
	condition = get_flag(8,16) == 3;
	question = "(Tell Nathan about the jewels)";
	text1 = "You describe in detail where you found the cache of jewels in the cathedral's catacombs. You also describe the eerie feeling you got in that chamber, but Nathan casually waves it away.";
	text2 = "_Nonsense. There's always some sort of trap guarding these things, I don't see why this one is so special. After all, I'm a jeweler, so I have what most people would call nimble fingers,_ he adds with a smirk.";
	text3 = "_Nonetheless, I thank you for finding the treasure for me, and I believe you should be compensated._";
	text4 = "He reaches into a pocket and withdraws a sizeable pouch of coins, then tosses it to you.";
	text5 = "_And with that, I'm off to claim my retirement._";
	code = 
		erase_char(20);
		change_coins(1000);
		toggle_quest(2,0);
		award_party_xp(50,20);
		set_flag(0,17,3);
		end();
	break;
